<!DOCTYPE html>
<html lang="zh-CN">

<head>
	<meta charset="utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title>配置组列表</title>
	<link href="__ADMIN__/assets/css/bootstrap.min.css" rel="stylesheet" />
	<link rel="stylesheet" href="__ADMIN__/css/style.css" />
	<link href="__ADMIN__/assets/css/codemirror.css" rel="stylesheet">
	<link rel="stylesheet" href="__ADMIN__/assets/css/ace.min.css" />
	<link rel="stylesheet" href="__ADMIN__/font/css/font-awesome.min.css" />
	<script src="__ADMIN__/js/jquery-1.9.1.min.js"></script>
	<script src="__ADMIN__/assets/js/bootstrap.min.js"></script>
	<script type="text/javascript" src="__ADMIN__/Widget/Validform/5.3.2/Validform.min.js"></script>
	<script src="__ADMIN__/assets/js/typeahead-bs2.min.js"></script>
	<script src="__ADMIN__/assets/js/jquery.dataTables.min.js"></script>
	<script src="__ADMIN__/assets/js/jquery.dataTables.bootstrap.js"></script>
	<script src="__ADMIN__/js/lrtk.js" type="text/javascript"></script>
	<script src="__ADMIN__/assets/layer/layer.js" type="text/javascript"></script>
	<script src="__ADMIN__/assets/laydate/laydate.js" type="text/javascript"></script>
	<script type="text/javascript">var ajax_url = "{:url(MODULE_NAME.'/GoodsType/ajaxRecommand')}";</script>
	<script src="__ADMIN__/js/goods_type.js" type="text/javascript"></script>
	<script src="__ADMIN__/js/common.js" type="text/javascript"></script>
	<script type="text/javascript"> var i = 1; </script>
</head>

<body>
	<div class="crumbs">
		<ul>
			<li>
				<a class="active" href="javascript:;">商品类型列表</a>
			</li>
		</ul>
	</div>
	<div class="page-content clearfix">
		<div class="administrator">
			<div class="d_Confirm_Order_style">
				<form action="" method="post">
					<div class="search_style">
						<ul class="search_content clearfix">
							<li>
								<label class="l_f">商品类型名称:</label>
								<input name="type_name" type="text" class="text_add" placeholder="" value="{if condition=" $type_name neq 'n'
								 "}{$type_name}{/if}"/>
							</li>
							<li>
								<label class="l_f">开启状态:</label>
								<select name="type_status">
									<option value="-1"
									{if condition="$type_status eq -1"}selected{/if}
									>==请选择==</option>
									<option value="1"
									{if condition="$type_status eq 1"}selected{/if}
									>==开启==</option>
									<option value="0"
									{if condition="$type_status eq 0"}selected{/if}
									>==关闭==</option>
								</select>
							</li>
							<li style="width:90px;">
								<input type="hidden" name="page" value="1">
								<button type="submit" class="btn_search">
									<i class="fa fa-search"></i>查询
								</button>
							</li>
						</ul>
					</div>
				</form>
				<!--操作-->
				<!--操作-->
				<div class="border clearfix">
					<span class="l_f">
						<a href="{:url('GoodsType/add')}" class="btn btn-warning">
							<i class="fa fa-plus"></i> 添加商品类型</a>
						<a href="javascript:;" class="btn btn-danger" OnClick="formAutoSubmit('type_id','right_form')">
							<i class="fa fa-trash"></i> 批量删除</a>
					</span>
				</div>
				<!--商品类型列表-->
				<div class="clearfix">
					<div class="table_menu_list">
						<form action="{:url('GoodsType/del')}" method="post" class="right_form">
							<table class="table table-striped table-bordered table-hover">
								<thead>
									<tr>
										<th width="25px">
											<label>
												<input type="checkbox" class="ace">
												<span class="lbl"></span>
											</label>
										</th>
										<th>ID</th>
										<th>商品类型名称</th>
										<th>类型属性</th>
										<th>状态</th>
										<th>添加时间</th>
										<th>操作</th>
									</tr>
								</thead>
								<tbody>
									{volist name="page_data" id="vo"}
										<tr>
											<td>
												<label>
													<input type="checkbox" class="ace type_id" name="type_id[]" value="{$vo['type_id']}">
													<span class="lbl"></span>
												</label>

											</td>
											<td>{$vo.type_id}</td>
											<td>{$vo.type_name}</td>
											<td>
												{if condition="!empty($vo['attr_data'])"}
													{volist name="vo['attr_data']" id="v"}
														{$v.attr_name}&nbsp;&nbsp;[
														{if condition="$v['attr_style'] eq 1"}规格
															{else/}属性{/if}]&nbsp;
														{if condition="$v['attr_type'] eq 1"}
															[{$v.attr_value}](单选框)
															{elseif condition="$v['attr_type'] eq 2" /} [{$v.attr_value}](复选框)
															{elseif condition="$v['attr_type'] eq 3" /} [{$v.attr_value}][输入框]
															{elseif condition="$v['attr_type'] eq 4" /} [{$v.attr_value}](下拉框)
														{/if}
														<br/>
													{/volist}
													{else/}
												{/if}
											</td>
											<td>
												{if condition="$vo['type_status'] eq 1"}
													<span class="label label-success radius ajax_get" value="0" title="点我停用" type="type_status" type_id="{$vo['type_id']}" txt="停用">已启用</span>
													{else/}
													<span class="label label-default radius ajax_get" value="1" title="点我启用" type="type_status" type_id="{$vo['type_id']}" txt="启用">停用</span>
												{/if}
											</td>
											<td>{$vo['add_time']|date="Y-m-d H:i:s"}</td>
											<td>

												<a title="编辑" href="{:url('GoodsType/edit',array('type_id'=>$vo['type_id']))}" class="btn btn-xs btn-info">
													<i class="fa fa-edit bigger-120"></i>
												</a>
												<a title="删除" href="javascript:;" onclick="confirm_msg(this)" url="{:url('GoodsType/del',array('type_id'=>$vo['type_id']))}"
												 class="btn btn-xs btn-warning">
													<i class="fa fa-trash  bigger-120"></i>
												</a>
											</td>
										</tr>
									{/volist}
								</tbody>
							</table>
						</form>
					</div>
				</div>
				<div class="row">
					<div class="col-sm-6">
						<div class="dataTables_info">共{$page_total}条</div>
					</div>
					<div class="col-sm-6">
						<div class="dataTables_paginate paging_bootstrap">
							<ul class="pagination">
								<?php echo htmlspecialchars_decode($page);?>
							</ul>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</body>

</html>